using System;
using System.Collections;
using System.Collections.Specialized;
using System.Collections.Generic;
using System.Text;

namespace PHSRAG.Utility
{
	public class NameObjectCollection : NameObjectCollectionBase
	{
		#region Properties
		// Gets a key-and-value pair (DictionaryEntry) using an index.
		public DictionaryEntry this[int index]
		{
			get
			{
				return (new DictionaryEntry(
					this.BaseGetKey(index), this.BaseGet(index)));
			}
		}

		// Gets or sets the value associated with the specified key.
		public Object this[String key]
		{
			get
			{
				return (this.BaseGet(key));
			}
			set
			{
				this.BaseSet(key, value);
			}
		}
		#endregion

		#region Methods
		// Adds an entry to the collection.
		public void Add(String key, Object value)
		{
			this.BaseAdd(key, value);
		}

		// Removes an entry with the specified key from the collection.
		public void Remove(String key)
		{
			this.BaseRemove(key);
		}

		// Removes an entry in the specified index from the collection.
		public void Remove(int index)
		{
			this.BaseRemoveAt(index);
		}

		// Clears all the elements in the collection.
		public void Clear()
		{
			this.BaseClear();
		}
		#endregion

	}
}
